package com.example.demo.mapper;

import com.example.demo.entity.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GoodsMapper {
    int insert(Goods goods);
    int updateById(Goods goods);
    int deleteByIds(@Param("ids") List<Integer> ids);
    int updateStatusByIds(@Param("ids") List<Integer> ids, @Param("status") Integer status);
    Goods selectById(Integer id);
    List<Goods> selectPage(@Param("title") String title, 
                         @Param("category_id") Integer category_id,
                         @Param("status") Integer status,
                         @Param("onlyShowStockWarning") Boolean onlyShowStockWarning);
    int countByTitle(String title);
}
